package com.sample.gafrica;
/*
 *   Copyright 2011 Google Inc.
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class HelloGAfricaActivity extends Activity {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		Button mapButton = (Button) findViewById(R.id.button_map);
		mapButton.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent mapIntent = new Intent(Intent.ACTION_VIEW, Uri
						.parse("geo:0,0?q=Kampala Sheraton,Kampala,Uganda"));
				
				//Intent mapIntent = new Intent(Intent.ACTION_VIEW, Uri
				//		.parse("geo:0,0?q=Sankara Nairobi, Nairobi, Kenya"));
				
				startActivity(mapIntent);
			}
		});


		final Intent agendaIntent = new Intent(this,AgendaActivity.class);
		
		Button agendaButton = (Button) findViewById(R.id.button_agenda);
		agendaButton.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				startActivity(agendaIntent);
			}
		});
		
		Button onlineButton = (Button) findViewById(R.id.button_online);
		onlineButton.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent mapIntent = new Intent(
						Intent.ACTION_VIEW,
						Uri.parse("https://sites.google.com/site/guganda2011/day2agenda"));
						//Uri.parse("https://sites.google.com/site/gkenya20/day-1-agenda"));
				startActivity(mapIntent);
			}
		});
	}
}